// let API = 'https://sangzitest.icebartech.com/api/';
let API,hrefUrl = location.href,appid;
  if(hrefUrl.includes('ccs168')){
    //测试  
    API = 'https://newmall.ccs168.cn/api/'
  }else{
    //线上
    API = 'https://www.ibears.top/api/'
  }
module.exports = {
  LIST: {
    LOGIN: API + 'wx/mp/',
    WECHATREJECT:API+`wx/mp/${appid}/signature`,
    subscribeCheck:API+`wx/mp/${appid}/subscribe/check`,
    LOADDICTIONARY:API+'base/app/loadDictionary/',   // 获取系统字典
    //首页 
    INDEXMENU: API + 'app/indexManage/plate/list',
    INDEXPOP: API + 'app/indexManage/popAdvertisement/list',
    INDEXBANNER: API + 'app/indexManage/banner/list',
    INDEXADVERTISE: API + 'app/indexManage/advertisementSpace/list',
    INDEXHOT: API + 'app/indexManage/hotProduct/list',
    INDEXNEW: API + 'app/indexManage/newProduct/list',
    INDEXFLOW: API + 'app/indexManage/waterfallsFlow/list',
    //分类
    CATEGORYLIST: API + 'app/product/category/page',
    PRODUCTPAGE: API + 'app/product/page',
    FREIGHT: API + 'app/order/get/fright/',
    PRDOUCTBYID: API + 'app/product/',
    //评论
    COMMENTPAGE: API + 'app/product/evaluation/page',
    //问问大家
    ASKPAGE: API + 'app/ask/everyone/page',
    ASKQUESTION:API+'app/ask/everyone/question',
    askEveryoneByid:API+'app/ask/everyone/',
    replyAsk:API+'app/ask/everyone/reply',
    //地址
    ADDRESSLIST: API + 'app/address/page',
    ADDRESSDELETE: API + 'app/address/delete/',
    ADDRESSSAVE: API + 'app/address/save',
    ADDRESSBYID: API + 'app/address/',
    ADDRESSFAULT: API + 'app/address/findDefault',
    SETADDRESSFAULT: API + 'app/address/setDefault/',
    //收藏
    collectCleanAll: API + 'app/user/collect/cleanAll',
    collectpage: API + 'app/user/collect/page',
    updCollection: API + 'app/user/collect/updCollection',
    disable:API+'app/user/collect/disable/',
    //购物车
    cartAdd: API + 'app/shopping/cart/add',
    cartDelete: API + 'app/shopping/cart/delete/',
    cartPage: API + 'app/shopping/cart/page',
    cartUpdate: API + 'app/shopping/cart/update/',
    //订单
    cancelOrderCode: API + 'app/product/order/cancel/',
    confirmOrderCode: API + 'app/product/order/confirm/',
    createOrderCode: API + 'app/product/order/create',
    deleteOrderCode: API + 'app/product/order/delete/',
    evaluationOrderCode: API + 'app/product/order/evaluation',
    evaluationOrderCodeByid: API + 'app/product/order/evaluation/',
    orderevaluationBypage: API + 'app/product/order/item/page',
    orderBypage: API + 'app/product/order/page',
    previewOrder: API + 'app/product/order/preview',
    orderByid: API + 'app/product/order/',
    //支付
    payCheck: API + `wx/pay/${appid}/query`,
    //系统设置
    hotTagList:API+'app/system/hot/tag/list',
    slogan:API+'app/system/findSlogan',
    //用户钱包
    points:API+'app/user/points/',
    findRank:API+'app/leader/board/findRank',
    findRankuser:API+'app/leader/board/user',
    SAVEUSER:API+'app/user/save',
    //手机
    mobileLOGIN:API+'app/user/login/mobile',
    register:API+'app/user/register/mobile',
    code:API+'base/verifyCode/sendMsgVerifyCode',
    bindMobile:API+'app/user/binding/mobile',
    changeMobile:API+'app/user/change/mobile',
    pointsOrderPage:API+'app/user/points/order/page',
    pointsPage:API+'app/user/points/income/page',
    handFree:API+"app/user/points/handFree/",
    withdrawalApply:API+"app/user/points/withdrawal/apply",
    helpPage:API+"app/system/help/page",
    helpByid:API+"app/system/help/",
    artlist:API+"app/system/article/list",
    shareById:API+"app/product/share/",
    bannerList:API+"app/index/banner/list",
    appUser:API+"app/user/login/",
    findAbutMall:API+"app/index/findAbutMall",
    findContact:API+"app/index/findContact",
    findFunction:API+"app/index/findFunction",
    findRegister:API+"app/index/findRegister",
    findUserBalance:API+"app/user/findUserBalance",
    payOrder:API+"app/product/order/pay-order",
    hotProduct:API+"app/index/hotProduct",
    newProduct:API+"app/index/newProduct",
    expQueryParam:API+"app/action/order/expQueryParam",
  },
  ORDER: {
    ORDERCANCEL: API + "app/product/order/cancel/", //取消订单
    ORDERCONFIRM: API + "app/product/order/confirm/",//订单确认收货
    ORDERCREATE: API + "app/product/order/create",//创建订单
    ORDERDEL: API + "app/product/order/delete/",//删除
    ORDEREVAL: API + "app/product/order/evaluation",//评价商品
    ORDEREVALID: API + "app/product/order/evaluation/",//查询商品明细评价
    ORDEREVALLIST: API + "app/product/order/item/page",//查询待评价订单及已评价订单
    ORDERITEMDETAIL: API+"app/product/order/items/", //订单明细
    ORDERLIST: API + "app/product/order/page",//分页查询订单信息
    ORDERPREVIEW: API + "app/product/order/preview",//订单预览
    ORDERDETAIL: API + "app/product/order/",//查询详情
    orderActionPage: API + "app/action/order/page",//查询详情
    ActionOrderDetail: API + "app/action/order/",//查询详情
    orderprepay: API + "app/action/order/prepay/",//查询详情
    orderZfbprepay: API + "app/action/order/prepay/alipay/",//查询详情
    actionorderpreview: API + "app/action/order/preview/v2",//查询详情
    actionConfrim: API + "app/action/order/confirm/",//查询详情
    actionevaluation: API + "app/action/order/evaluation",//查询详情
    actionCancel: API + "app/action/order/cancel/",//查询详情
  },
  ORDERTWO: {
    ORDERCANCEL: API + "app/ordinary/product/order/cancel/", //取消订单
    ORDERCONFIRM: API + "app/ordinary/product/order/confirm/",//订单确认收货
    ORDERCREATE: API + "app/ordinary/product/order/create",//创建订单
    ORDERDEL: API + "app/ordinary/product/order/delete/",//删除
    ORDEREVAL: API + "app/ordinary/product/order/evaluation",//评价商品
    ORDEREVALID: API + "app/ordinary/product/order/evaluation/",//查询商品明细评价
    ORDEREVALLIST: API + "app/ordinary/product/order/item/page",//查询待评价订单及已评价订单
    ORDERITEMDETAIL: API+"app/ordinary/product/order/items/", //订单明细
    ORDERLIST: API + "app/ordinary/order/page",//分页查询订单信息
    ORDERPREVIEW: API + "app/ordinary/product/order/preview",//订单预览
    ORDERDETAIL: API + "app/ordinary/order/",//查询详情
    actionorderpreview: API + "app/ordinary/order/preview/v2",//查询详情
    orderprepay: API + "app/ordinary/order/prepay/",//查询详情
    orderZfbprepay: API + "app/ordinary/order/prepay/alipay/",//查询详情
    actionConfrim: API + "app/ordinary/order/confirm/",//查询详情
    actionevaluation: API + "app/ordinary/order/evaluation",//查询详情
    actionCancel: API + "app/ordinary/order/cancel/",//查询详情
    actionOrderCreate: API + "app/ordinary/order/create/v2",//获取无二维码提示
  },
  MY: {
    USERINFO: API + "app/user/",//获取当前登陆用户信息
    USERBINDMOBILE: API + "app/user/binding/mobile",//绑定手机
    USERCHECKMOBILE: API + "app/user/checkMobile/",//检查手机号是否被注册
    USERPOINTS: API + "app/user/points/",//获取当前用户钱包
    USERPOINTSLIST: API + "app/user/points/page",//分页获取积分流水
    USERCOLLECTCLEANALL: API + "app/user/collect/cleanAll",//清空
    USERCOLLECTLIST: API + "app/user/collect/page",//分页
    USERCOLLECTCOLLECT: API + "app/user/collect/updCollection",//收藏/取消收藏
    USERBANKLIST: API + "app/user/bankcard/page",//银行卡分页
    USERBANKSAVE: API + "app/user/bankcard/save",//保存
    USERBANKDEL: API + "app/user/bankcard/",//删除
    PERSONALQR: API + "app/qr/personal/page",//获取个人二维码模板列表
    PRODUCTFIND: API + "app/qr/product/find",//获取商品二维码信息模板
    PERSONALPROMPTFIND: API + "app/qr/prompt/find",//获取无二维码提示
    userPage: API + "app/user/page",//获取无二维码提示
    actionOrderCreate: API + "app/action/order/create/v2",//获取无二维码提示
    actionOrderUpdate: API + "app/action/order/weixin/update/",//获取无二维码提示
    refundCancel: API + "app/refund/cancel/",//获取无二维码提示
    refundDetail: API + "app/refund/",//获取无二维码提示
  },
 
  UPLOAD: {
    UPLOAD: API+"base/app/getCOSUploadUrl"
  },
  REFUND: {
      APPLY: API+"app/refund/apply",
      LIST: API+"app/refund/page",
      DETAIL :API+"app/refund/"
  },
  KD: {
    detail: API+"kd/push/findKdniaoTraces"
  }
}